Skip to content

test: add Maestro provider integration guards#620

Merged
thymikee merged 3 commits into
mainfrom
test/maestro-provider-integration-guards
May 30, 2026
Merged

test: add Maestro provider integration guards#620
thymikee merged 3 commits into
mainfrom
test/maestro-provider-integration-guards

Conversation

@thymikee

@thymikee thymikee commented May 30, 2026

Copy link
Copy Markdown
Member

Summary

Add provider-backed Android Maestro replay suite coverage for directory YAML discovery, fresh selector snapshots plus content-lane swipes, the native input submit path, no-Enter focused typing, runtime runFlow/retry batches, and optional tap miss behavior.

Touched-file count: 1. Scope stays within the provider integration test suite.

Validation

Verified with focused provider/unit checks and TypeScript:

  • pnpm exec vitest run --project provider-integration test/integration/provider-scenarios/android-test-suite.test.ts passed with 7 tests.
  • pnpm exec vitest run --project unit src/compat/maestro/__tests__/replay-flow.test.ts passed with 27 tests.
  • pnpm typecheck passed.
  • pnpm format passed; unrelated formatter churn was restored before commit.

@thymikee thymikee left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review — provider-backed Maestro guards

Good additions. Provider-backed replay guards are exactly the safety net needed to refactor the Maestro layer toward "behave like Maestro, but faster" with confidence, and the optional-tap-miss case (optional: true must not touch the device) is a particularly valuable compat invariant to lock down.

A few things to coordinate before/at merge:

  1. Duplicate tests across the stack. Two of these tests are byte-for-byte duplicated in sibling PRs:

    • "coalesces tapOn inputText and pressKey Enter through native paths" is also added in #623.
    • "executes runFlow conditions and retry batches at runtime" is also added in #626.

    Whichever lands second will hit a merge conflict (or, worse, silently produce two identically-named test(...) blocks). Please pick a single home for each — either this umbrella PR owns the guards and #623/#626 drop them, or vice versa.

  2. The Enter case doesn't actually guard the #623 convergence. This flow uses tapOn + inputText + pressKey: Enter, which already coalesces to wait+fill on main via the existing Enter path. The new behavior in #623 is coalescing without a trailing Enter. If the intent is to guard the convergence work, add the no-Enter variant here so a regression in optimizeTypedAfterTap is caught.

  3. Loose snapshots >= 2/3 assertions are fine as smoke checks, but consider asserting exact counts where the flow is deterministic — it would catch accidental extra round-trips, which matters for the "faster" goal.

Nothing blocking on the test logic itself.


Generated by Claude Code

@thymikee thymikee left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in ba3308e:

  • Kept the umbrella provider guards in #620; #623/#626 can drop their duplicate copies later.
  • Added a provider-backed tapOn + inputText no-Enter guard, and kept a separate Enter-preservation guard with a distinct test name.
  • Updated optimizeTypedAfterTap so input-looking tapOn + inputText coalesces to wait + fill without requiring trailing Enter.
  • Replaced deterministic provider snapshot >= checks with exact counts.

Validation passed: focused provider integration test, focused Maestro replay-flow unit test, pnpm typecheck, and pnpm format with unrelated formatter churn restored.

@thymikee thymikee merged commit 5d68483 into main May 30, 2026
17 checks passed
@thymikee thymikee deleted the test/maestro-provider-integration-guards branch May 30, 2026 13:38
@github-actions

Copy link
Copy Markdown
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-05-30 13:38 UTC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant